package com.lagou.edu.serviceImpl;

import com.lagou.edu.dao.LagouAuthCodeDao;
import com.lagou.edu.pojo.LagouAuthCode;
import com.lagou.edu.service.LagouAuthCodeService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class LagouAuthCodeServiceImpl implements LagouAuthCodeService {

    @Autowired
    private LagouAuthCodeDao lagouAuthCodeDao;

    @Override
    public LagouAuthCode getOneByCode(String code) {
        return lagouAuthCodeDao.getOneByCode(code);
    }

    @Override
    public LagouAuthCode getByEmailAndCode(String email, String code) {
        return lagouAuthCodeDao.getByEmailAndAndCode(email,code);
    }

    @Override
    public void delete(LagouAuthCode lagouAuthCode) {
        lagouAuthCodeDao.delete(lagouAuthCode);
    }

    @Override
    public LagouAuthCode save(LagouAuthCode lagouAuthCode) {
        return lagouAuthCodeDao.save(lagouAuthCode);
    }

    @Override
    public void removeByEmail(String email) {
        lagouAuthCodeDao.removeByEmail(email);
    }
}
